<?php
require_once "ModelBase.php";

class Role extends TTEvent_Table_Abstract
{
	protected $_name = 'tamtay_role';
	protected $_primary = 'rid';
	
	public function getUserRoles($uid)
	{
		$sql="SELECT r.rid, r.name FROM tamtay_role r INNER JOIN tamtay_role_user ur ON ur.rid = r.rid WHERE ur.uid = $uid";
		return $this->execSelectQuery($sql);				
	}
}

